﻿(function () {
    "use strict";

    WinJS.UI.Pages.define("/pages/item/item.html", {
        // This function is called whenever a user navigates to this page. It
        // populates the page elements with the app's data.
        ready: function (element, options) {
            var station = options.item;
            element.querySelector(".titlearea .pagetitle").textContent = station.Name

            var listElement = document.getElementById("DepartureList");
            var list = listElement.winControl;

            list.itemDataSource = station.ETAs.dataSource;
        }
    });
})();
